/**
 * This class creates the user. It takes in the UserName and password and a boolean to tell weather the user is 
 * locked out or not. There are four roles (doc, nurse, patient, system admin). Deterimes the current role
 * of the person logging in. Pulls in patient information and has a record for how many attempts the user has tried
 * to log in. 
 * @author evelyn942
 * @version 1.0 3-10-11
 */


public class User {

    private String userName, password;
    private boolean suspended;
    private boolean[4] roles;
    private Role current; 
    private PatientInformation info; 
    private int failedAttempts;
    
    public void user(String userName, String password, boolean suspended, 
    		Role current, PatientInformation info, int failedAttempts){
    	this.userName = userName;
    	this.password = password;
    	this.suspended = suspended;
    	this.current = current;
    	this.info = info;
    	this.failedAttempts = failedAttempts;
    }
    
    
    public void addTreatmentRecord(TreatmentRecord tr){
    }

/**General getters and setters
*/
    public void setUserName(String userName){
		this.userName = userName;
    }
    public String getUserName(){
    	return userName;
    }
    public void setPassword(String password){
		this.password = password;
    }
    public String getPassword(){
    	return password;
    }
    public void setSuspended(Boolean suspended){
    	this.suspended = suspended; 
    }
    public Boolean getSuspended(){
    	return suspended;
    }
    
/**
 * getters for trickle down- all the getters to access stuff in PatientInformation class
 */
    public String getName(){
    	return info.getName();
    }
    public void setName(String name){
    	info.setName(name);
    }
    public String getAddress(){
    	return info.getAddress();
    }
    public void setAddress(String address){
    	info.setAddress(address);
    }
    public String getPhone(){
    	return info.getPhone();
    }
    public void setPhone(String phone){
    	info.setPhone(phone);
    }
    public String getEmail(){
    	return info.getEmail();
    }
    public void setEmail(String email){
    	info.setEmail(email);
    }
    public String getPharmacy(){
    	return info.getPharmacy();
    }
    public void setPharmacy(String pharmacy){
    	info.setPharmacy(pharmacy);
    }
    public String getInsurance(){
    	return info.getInsurance();
    }
    public void setInsurance(String insurance){
    	info.setInsurance(insurance);
    }
    public String getCellPhone(){
    	return info.getCellPhone();
    }
    public void setCellPhone(String cellPhone){
    	info.setCellPhone(cellPhone);
    }
    public Enum getGender(){
    	return info.getGender();
    }
    public void setGender(Enum gender){
    	info.setGender(gender);
    }
    public int getAge(){
    	return info.getAge();
    }
    public void setAge(int age){
    	info.setAge(age);
    }
    public String getAllergies(){
    	return info.getAllergies();
    }
    public void setAllergies(String allergies){
    	info.setAllergies(allergies);
    }
    
/*
 * Other getters and setters
 */
    public PatientInformation getPatientInfo(){
    	return info;
    }
    public MedicalHistory getMedicalHistory(){
    	return info.getMedicalHistory();
    }
/**    
    public TreatmentRecord getNewestTreatment(){
    	return treatmentRecord;
    }
    public TreatmentRecord getTreatmentRecord(){
    	return treatmentRecord;
    }
 **/   
}
